/*C1*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C2*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C3*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C4*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C5*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C6*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C7*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C8*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C9*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C10*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C11*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C12*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C13*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C14*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C15*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C16*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C17*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C18*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C19*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C20*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C21*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C22*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C23*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C24*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C25*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C26*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C27*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C28*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C29*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C30*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C31*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C32*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C33*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C34*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C35*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C36*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C37*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C38*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C39*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C40*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C41*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C42*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(11,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C43*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C44*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C45*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(14,'bowser','2010-02-08',2,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C46*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C47*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(5,7,'2010-02-08','test')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C48*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C49*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C50*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C51*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C52*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(12,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C53*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C54*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C55*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(15,'bowser','2010-02-08',2,6)
DELETE FROM OWNERS WHERE ID=6
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C56*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C57*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(6,7,'2010-02-08','test')
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C58*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C59*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C60*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C61*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
/*C62*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
/*C61*/SET AUTOCOMMIT TRUE
DISCONNECT
/*C62*/SET AUTOCOMMIT TRUE
DISCONNECT
/*C63*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C64*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C65*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C66*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C67*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(13,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C68*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C69*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C70*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(16,'bowser','2010-02-08',2,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C71*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C72*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(7,7,'2010-02-08','test')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C73*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C74*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C75*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C76*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C77*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C78*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C79*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C80*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C81*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(14,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C82*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C83*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C84*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(17,'bowser','2010-02-08',2,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C85*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C86*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(8,7,'2010-02-08','test')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C87*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C88*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C89*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C90*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C91*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C92*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C93*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C94*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C95*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C96*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C97*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C98*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C99*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C100*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(11,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C101*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C102*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C103*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(14,'bowser','2010-02-08',2,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C104*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C105*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(5,7,'2010-02-08','test')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C106*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C107*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C108*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C109*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C110*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(12,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C111*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C112*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C113*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(15,'bowser','2010-02-08',2,6)
DELETE FROM OWNERS WHERE ID=6
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C114*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C115*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(6,7,'2010-02-08','test')
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C116*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C117*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C118*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C119*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
/*C120*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
/*C119*/SET AUTOCOMMIT TRUE
DISCONNECT
/*C120*/SET AUTOCOMMIT TRUE
DISCONNECT
/*C121*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C122*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C123*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C124*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C125*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(13,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C126*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C127*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C128*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(16,'bowser','2010-02-08',2,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C129*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C130*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(7,7,'2010-02-08','test')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C131*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C132*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C133*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C134*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C135*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C136*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C137*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C138*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C139*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(14,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C140*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C141*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C142*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(17,'bowser','2010-02-08',2,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C143*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C144*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(8,7,'2010-02-08','test')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C145*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C146*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C147*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C148*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C149*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C150*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C151*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C152*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C153*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C154*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C155*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C156*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C157*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C158*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C159*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C160*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C161*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C162*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C163*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C164*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C165*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C166*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C167*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(11,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C168*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C169*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C170*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(14,'bowser','2010-02-08',2,6)
DELETE FROM OWNERS WHERE ID=6
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C171*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C172*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(5,7,'2010-02-08','test')
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C173*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C174*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C175*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C176*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C177*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C178*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C179*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C180*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C181*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C182*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(12,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C183*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C184*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C185*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(15,'bowser','2010-02-08',2,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C186*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C187*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(6,7,'2010-02-08','test')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C188*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C189*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C190*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C191*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C192*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C193*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C194*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C195*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C196*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C197*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C198*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C199*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C200*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C201*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C202*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C203*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C204*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C205*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C206*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C207*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C208*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C209*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C210*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C211*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C212*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C213*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C214*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(11,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C215*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C216*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C217*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(14,'bowser','2010-02-08',2,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C218*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C219*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(5,7,'2010-02-08','test')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C220*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C221*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C222*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C223*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C224*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(12,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C225*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C226*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C227*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(15,'bowser','2010-02-08',2,6)
DELETE FROM OWNERS WHERE ID=6
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C228*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C229*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(6,7,'2010-02-08','test')
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C230*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C231*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C232*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C233*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C234*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C235*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C236*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C237*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C238*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C239*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(13,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C240*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C241*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C242*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(16,'bowser','2010-02-08',2,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C243*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C244*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(7,7,'2010-02-08','test')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C245*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C246*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C247*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C248*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
/*C249*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
/*C248*/SET AUTOCOMMIT TRUE
DISCONNECT
/*C249*/SET AUTOCOMMIT TRUE
DISCONNECT
/*C250*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C251*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C252*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C253*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C254*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(14,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C255*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C256*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C257*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(17,'bowser','2010-02-08',2,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C258*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C259*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(8,7,'2010-02-08','test')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C260*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C261*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C262*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C263*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C264*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C265*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C266*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C267*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C268*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO OWNERS VALUES(15,NULL,'Schultz',NULL,NULL,NULL)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C269*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=1
INSERT INTO OWNERS VALUES(1,'George','FranklinX','110 W. Liberty St.','Madison','6085551023')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C270*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
/*C271*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO PETS VALUES(18,'bowser','2010-02-08',2,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C272*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=7
INSERT INTO PETS VALUES(7,'SamanthaX','1995-09-04',1,6)
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C273*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VISITS VALUES(9,7,'2010-02-08','test')
ROLLBACK
SET AUTOCOMMIT TRUE
DISCONNECT
/*C274*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C275*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C276*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C277*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C278*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 DROP TABLE visits
 DROP TABLE pets
 DROP TABLE owners
 DROP TABLE types
 DROP TABLE vet_specialties
 DROP TABLE specialties
 DROP TABLE vets
DISCONNECT
/*C279*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
 CREATE TABLE vets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30) )
 CREATE INDEX vets_last_name ON vets(last_name)
  CREATE TABLE specialties ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX specialties_name ON specialties(name)
  CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )
 alter table vet_specialties add constraint fk_vet_specialties_vets foreign key (vet_id) references vets(id)
 alter table vet_specialties add constraint fk_vet_specialties_specialties foreign key (specialty_id) references specialties(id)
  CREATE TABLE types ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(80) )
 CREATE INDEX types_name ON types(name)
  CREATE TABLE owners ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, first_name VARCHAR(30), last_name VARCHAR(30), address VARCHAR(255), city VARCHAR(80), telephone VARCHAR(20) )
 CREATE INDEX owners_last_name ON owners(last_name)
  CREATE TABLE pets ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(30), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER NOT NULL )
 alter table pets add constraint fk_pets_owners foreign key (owner_id) references owners(id)
 alter table pets add constraint fk_pets_types foreign key (type_id) references types(id)
 CREATE INDEX pets_name ON pets(name)
  CREATE TABLE visits ( id INTEGER NOT NULL IDENTITY PRIMARY KEY, pet_id INTEGER NOT NULL, visit_date DATE, description VARCHAR(255) )
 alter table visits add constraint fk_visits_pets foreign key (pet_id) references pets(id)
 CREATE INDEX visits_pet_id ON visits(pet_id)
DISCONNECT
/*C280*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
DISCONNECT
/*C281*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
INSERT INTO VETS VALUES(1,'James','Carter')
INSERT INTO VETS VALUES(2,'Helen','Leary')
INSERT INTO VETS VALUES(3,'Linda','Douglas')
INSERT INTO VETS VALUES(4,'Rafael','Ortega')
INSERT INTO VETS VALUES(5,'Henry','Stevens')
INSERT INTO VETS VALUES(6,'Sharon','Jenkins')
INSERT INTO SPECIALTIES VALUES(1,'radiology')
INSERT INTO SPECIALTIES VALUES(2,'surgery')
INSERT INTO SPECIALTIES VALUES(3,'dentistry')
INSERT INTO VET_SPECIALTIES VALUES(2,1)
INSERT INTO VET_SPECIALTIES VALUES(3,2)
INSERT INTO VET_SPECIALTIES VALUES(3,3)
INSERT INTO VET_SPECIALTIES VALUES(4,2)
INSERT INTO VET_SPECIALTIES VALUES(5,1)
INSERT INTO TYPES VALUES(1,'cat')
INSERT INTO TYPES VALUES(2,'dog')
INSERT INTO TYPES VALUES(3,'lizard')
INSERT INTO TYPES VALUES(4,'snake')
INSERT INTO TYPES VALUES(5,'bird')
INSERT INTO TYPES VALUES(6,'hamster')
INSERT INTO OWNERS VALUES(1,'George','Franklin','110 W. Liberty St.','Madison','6085551023')
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
INSERT INTO OWNERS VALUES(3,'Eduardo','Rodriquez','2693 Commerce St.','McFarland','6085558763')
INSERT INTO OWNERS VALUES(4,'Harold','Davis','563 Friendly St.','Windsor','6085553198')
INSERT INTO OWNERS VALUES(5,'Peter','McTavish','2387 S. Fair Way','Madison','6085552765')
INSERT INTO OWNERS VALUES(6,'Jean','Coleman','105 N. Lake St.','Monona','6085552654')
INSERT INTO OWNERS VALUES(7,'Jeff','Black','1450 Oak Blvd.','Monona','6085555387')
INSERT INTO OWNERS VALUES(8,'Maria','Escobito','345 Maple St.','Madison','6085557683')
INSERT INTO OWNERS VALUES(9,'David','Schroeder','2749 Blackhawk Trail','Madison','6085559435')
INSERT INTO OWNERS VALUES(10,'Carlos','Estaban','2335 Independence La.','Waunakee','6085555487')
INSERT INTO PETS VALUES(1,'Leo','2000-09-07',1,1)
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
INSERT INTO PETS VALUES(3,'Rosy','2001-04-17',2,3)
INSERT INTO PETS VALUES(4,'Jewel','2000-03-07',2,3)
INSERT INTO PETS VALUES(5,'Iggy','2000-11-30',3,4)
INSERT INTO PETS VALUES(6,'George','2000-01-20',4,5)
INSERT INTO PETS VALUES(7,'Samantha','1995-09-04',1,6)
INSERT INTO PETS VALUES(8,'Max','1995-09-04',1,6)
INSERT INTO PETS VALUES(9,'Lucky','1999-08-06',5,7)
INSERT INTO PETS VALUES(10,'Mulligan','1997-02-24',2,8)
INSERT INTO PETS VALUES(11,'Freddy','2000-03-09',5,9)
INSERT INTO PETS VALUES(12,'Lucky','2000-06-24',2,10)
INSERT INTO PETS VALUES(13,'Sly','2002-06-08',1,10)
INSERT INTO VISITS VALUES(1,7,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(2,8,'1996-03-04','rabies shot')
INSERT INTO VISITS VALUES(3,8,'1996-06-04','neutered')
INSERT INTO VISITS VALUES(4,7,'1996-09-04','spayed')
COMMIT
DISCONNECT
/*C282*/SET SCHEMA PUBLIC
CONNECT USER SA
DISCONNECT
/*C283*/SET SCHEMA PUBLIC
CONNECT USER SA
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
DELETE FROM OWNERS WHERE ID=2
INSERT INTO OWNERS VALUES(2,'Betty','Davis','638 Cardinal Ave.','Sun Prairie','6085551749')
COMMIT
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=2
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
COMMIT
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
DELETE FROM PETS WHERE ID=2
INSERT INTO PETS VALUES(2,'Basil','2002-08-06',6,2)
COMMIT
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
SET AUTOCOMMIT FALSE
SET AUTOCOMMIT TRUE
DISCONNECT
